﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.RequireComponent
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  /// <summary>
  ///   <para>The RequireComponent attribute automatically adds required components as dependencies.</para>
  /// </summary>
  [RequiredByNativeCode]
  [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  public sealed class RequireComponent : Attribute
  {
    public System.Type m_Type0;
    public System.Type m_Type1;
    public System.Type m_Type2;

    /// <summary>
    ///   <para>Require a single component.</para>
    /// </summary>
    /// <param name="requiredComponent"></param>
    public RequireComponent(System.Type requiredComponent) => this.m_Type0 = requiredComponent;

    /// <summary>
    ///   <para>Require two components.</para>
    /// </summary>
    /// <param name="requiredComponent"></param>
    /// <param name="requiredComponent2"></param>
    public RequireComponent(System.Type requiredComponent, System.Type requiredComponent2)
    {
      this.m_Type0 = requiredComponent;
      this.m_Type1 = requiredComponent2;
    }

    /// <summary>
    ///   <para>Require three components.</para>
    /// </summary>
    /// <param name="requiredComponent"></param>
    /// <param name="requiredComponent2"></param>
    /// <param name="requiredComponent3"></param>
    public RequireComponent(
      System.Type requiredComponent,
      System.Type requiredComponent2,
      System.Type requiredComponent3)
    {
      this.m_Type0 = requiredComponent;
      this.m_Type1 = requiredComponent2;
      this.m_Type2 = requiredComponent3;
    }
  }
}
